<html lang="en">
<head>
    <title>攻略推荐管理</title>
    <#include "../common/header.ftl">

    <link type="text/css" rel="stylesheet" href="/js/plugins/uploadifive/uploadifive.css" />
    <script type="text/javascript" src="/js/plugins/uploadifive/jquery.uploadifive.min.js"></script>
    <link href="/js/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jqPaginator/jq-paginator.min.js"></script>
</head>
<body>
<!--左侧菜单回显变量设置-->
<#assign currentMenu="strategyCommentList">

<div class="container-fluid " style="margin-top: 20px">
    <#include "../common/top.ftl">
    <div class="row">
        <div class="col-sm-2">
            <#include "../common/menu.ftl">
        </div>
        <div class="col-sm-10">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">攻略评论管理</h1>
                </div>
            </div>
            <#setting number_format="#">
            <!--高级查询--->
           <#-- <form class="form-inline" id="searchForm" action="/strategyCommend/list" method="post">
                <input type="hidden" name="currentPage" id="currentPage" value="1">
                <a href="JavaScript:;" class="btn btn-success inputBtn"><span class="glyphicon glyphicon-plus"></span>  添加</a>
            </form>-->

            <table class="table table-striped table-hover" >
                <thead>
                    <tr>
                        <th>序号</th>
                        <th>用户名</th>
                        <th>用户头像</th>
                        <th>评论内容</th>
                        <th>攻略标题</th>
                        <th>操作</th>
                    </tr>
                </thead>
               <#list page.content as entity>
                   <tr>
                       <td>${entity_index+1}</td>
                       <td>${entity.username!}></td>
                       <td><img src="${entity.headUrl!}" width="50px">></td>
                       <td>${entity.content!}</td>

                       <td>${entity.detailTitle!}</td>

                       <td>
                           <#--<a class="btn btn-info btn-xs inputBtn" href="javascript:;" data-json='${entity.jsonString}'>
                               <span class="glyphicon glyphicon-edit"></span> 编辑
                           </a>-->
                           <a href="javascript:;" class="btn btn-danger btn-xs deleteBtn"
                              data-url="/comment/strategyComment/delete?id=${entity.id}">
                               <span class="glyphicon glyphicon-trash"></span> 删除
                           </a>
                       </td>
                   </tr>
               </#list>
            </table>
            <#--分页-->
            <div style="float: right">
                <div style="float: left;"><span style="line-height:30px"> 共${page.totalPages!}页 / ${page.totalElements}条&nbsp;&nbsp;&nbsp;</span>
                </div>
                <div id="pagination" class="jq-pagination" style="display: inline;"></div>
            </div>
            <script>
                $("#pagination").jqPaginator({
                            totalPages: ${page.totalPages!0},
                            visiblePages: 5,
                            currentPage: ${page.number+1} || 1,
                        prev
                :
                '<a class="prev" href="javascript:void(0);">上一页<\/a>',
                        next
                :
                '<a class="next" href="javascript:void(0);">下一页<\/a>',
                        page
                :
                '<a href="javascript:void(0);">{{page}}<\/a>',
                        last
                :
                '<a class="last" href="javascript:void(0);" >尾页<\/a>',
                        onPageChange
                :
                function (page, type) {
                    if (type == 'change') {
                        $("#currentPage").val(page);
                        $("#searchForm").submit();
                    }

                }
                })
            </script>
        </div>
    </div>
</div>
</body>
</html>